package edu.nf.redismqes.model.docmentt;

import edu.nf.redismqes.model.entity.New;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @ Author bin
 * @ Create  2025/10/21 下午4:01
 **/
@Document(indexName = "user",createIndex = false)
public class NewDoc {
    /**
     * 新闻id
     * */
    @Id
    private Integer id;

    /**
     * 新闻标题
     * */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;

    /**
     * 作者
     * */
    @Field(type = FieldType.Text)
    private String author;

    /**
     * 类别
     * */
    @Field(type = FieldType.Text)
    private String type;

    /**
     * 正文
     * */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String content;

    /**
     * 发布日期
     * */
   /* @Field(type = FieldType.Keyword,index = false)
    private String publicshDate;*/


    public NewDoc() {
    }

    public NewDoc(Integer id, String title, String author, String type, String content, String publicshDate) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.type = type;
        this.content = content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

}
